package packets;

/**
 * These constants are found in both projects and allow for certain I/O unique to certain operations between the server
 * and the client(s)
 * 
 * @author Oliver Behncke 
 * @author Holly Denton 
 * @author Matthew McCarthy
 * @author John Quinlivan
 *
 */
public class PacketConstants {
	
	/* The length of a "timeout" between requests, as a value in milliseconds */
	public static final int TIMEOUT = -10000;
	
	/* Default state */
	public static final byte NULL = 0;
	
	/* Sends a "terminating" call to the remote socket. This is actually equivalent to the (Java) Input stream 
	 * being terminated (a -1 is read from the stream). Allows for non-Java projects to cause a termination too */
	public static final byte TERMINATING = -1;
	
	/* Marks this connection as terminated */
	public static final byte TERMINATED = -2;

	/* Inform the connected pair that this side is about to send a file and prepare to receive such (as an array of bytes) */
	public static final byte SENDING_DATA = -100;

	/* Response to the sending file request, implies that the peer is ready for a response */
	public static final byte READY_FOR_DATA_TRANSFER = -101;

	/* Request for another copy of the database be sent */
	public static final byte REQUEST_DATABASE = -125;

	/**
	 * No instantiation
	 */
	private PacketConstants() {}

}
